Artificial intelligence (AI) refers to technologies that simulate human thinking and action by using modern tools such as computers. With continuous advancement of AI technologies, AI technologies have been applied to various aspects of industrial manufacturing and human life.
For example, when the AI technologies are applied to a game application program, an entity having human-like behaviors is generated. The entity is an AI agent. Because the AI agent can exhibit intelligent behaviors and activities similar to intelligent behaviors and activities of human, or characteristics consistent with a player's thinking and perception, the AI agent can improve playability of the game application program.
During the design of an application program related to AI, the focus of the design of the application program related to AI is how to make an AI agent implement a certain AI behavior. When a simple method for implementing an AI behavior is used, efficiency of designing the application program related to AI can be improved.
Conventionally, during the design of an application program related to AI, a method typically used for implementing an AI behavior includes the following steps. First, an AI planner designs logic of an AI behavior to be implemented by an AI agent. Next, a program developer compiles the logic of the AI behavior to be implemented by the AI agent into corresponding code. Then, the planner runs the compiled code and detects whether the compiled code can reach or generate preset effects of the AI behavior. When the AI agent generates the preset effects of the AI behavior, the AI behavior of the AI agent is thus implemented. Otherwise, when the AI agent does not generate the preset effects of the AI behavior, the code needs to be compiled and debugged until the AI agent generates the preset effects of the AI behavior.
However, existing technologies have various problems. For example, when existing technology is used for implementing an AI behavior, code needs to be compiled and constantly adjusted. Therefore, a development cycle needed for implementing an AI behavior is often long, and efficiency of implementing an AI behavior is low. In addition, when a certain AI behavior needs to be added to or deleted from a certain application program, code needs to be modified in order to implement the adding or deleting. Further, after the adding or deleting of the AI behavior, the code needs to be compiled and debugged again. Modifying the code is often cumbersome. The invested time and labor cost is thus significant.